import 'package:flutter/material.dart';

class MyStyles extends ThemeExtension<MyStyles> {
  static const TextStyle _homePrimaryTextStyle = TextStyle(
      color: Colors.white,
      fontFamily: "SFProRoundedRegular",
      decoration: TextDecoration.none);
  static const Color _homeTextShadowColor = Color.fromARGB(50, 0, 0, 0);

  static const List<Shadow> _shadows = [
    Shadow(
      blurRadius: 8.0,
      color: _homeTextShadowColor,
      offset: Offset(2.0, 2.0),
    )
  ];

  /// 字体显示的阴影
  final List<Shadow> shadows = _shadows;

  /// 全局主要的字体样式
  static const TextStyle _textStyle = TextStyle(
    color: Colors.white,
    fontStyle: FontStyle.normal,
    fontFamily: "PingFangLight",
    letterSpacing: 0,
    decoration: TextDecoration.none,
  );

  /// 小标题字体样式
  static const TextStyle _titleStyle = TextStyle(
    color: Colors.white,
    fontStyle: FontStyle.normal,
    fontFamily: "PingFangRegular",
    letterSpacing: 0,
    decoration: TextDecoration.none,
  );

  final TextStyle titleStyle = _titleStyle.copyWith(
    fontSize: 20,
  );
  final TextStyle textStyle = _textStyle.copyWith(
    fontSize: 18,
  );

  /// 首页 widget 圆角
  final BorderRadius radius = const BorderRadius.all(Radius.circular(25));
  /// 首页 widget 图片上的 覆盖色
  final Color overlay = const Color.fromARGB(25, 0, 0, 0);
  /// 边框样式
  final Border border = Border.all(width: 1, color: const Color.fromARGB(50, 255, 255, 255));

  /// 首页 时间显示样式
  TextStyle homeTimeTextStyle = _homePrimaryTextStyle.copyWith(
    fontSize: 125,
    letterSpacing: -4.32,
    shadows: _shadows,
  );

  /// 首页天气温度显示样式
  TextStyle homeWeatherTemperatureTextStyle = _homePrimaryTextStyle.copyWith(
    fontSize: 32,
    letterSpacing: -0.96,
    shadows: [
      const Shadow(
        blurRadius: 4.0,
        color: _homeTextShadowColor,
        offset: Offset(2.0, 2.0),
      )
    ]
  );

  final Color highlightColor = const Color.fromARGB(180, 255, 255, 255);
  final Color normalColor = const Color.fromARGB(40, 68, 68, 68);
  
  final Color lightHighlightColor = const Color.fromARGB(255, 244, 203, 8);
  final Color fanHighlightColor = const Color.fromARGB(255, 72, 255, 50);
  final Color lightNormalColor = Colors.white;
  final Color iconBackgroundColor = const Color.fromARGB(40, 255, 255, 255);

  final Color dialogBarrierColor = const Color.fromARGB(230, 0, 0, 0);
  final Color panelDisableForegroundColor = const Color.fromARGB(128, 0, 0, 0);
  final Color panelBackgroundColor = const Color.fromARGB(255, 55, 55, 55);

  final double panelWidgetSpace = 10.0;
  final double panelWidgetWidth = 242.0;
  final double panelWidgetHeight = 488.0;

  MyStyles();

  @override
  ThemeExtension<MyStyles> copyWith() {
    return MyStyles();
  }

  @override
  ThemeExtension<MyStyles> lerp(covariant ThemeExtension<MyStyles>? other, double t) {
    return MyStyles();
  }
}
